package com.pro.utils;

import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class MD5Util {
	public static String md5(String password) {
	    try {
			MessageDigest instance = MessageDigest.getInstance("md5");
			byte[] digest = instance.digest(password.getBytes());
			password = new BigInteger(1,digest).toString(16);
		} catch (NoSuchAlgorithmException e) {
			e.printStackTrace();
		}
	    return password;
	}
}
